package com.lanchuan.soft.controller;

import com.lanchuan.soft.service.IVersionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("version")
public class VersionController {

    private IVersionService versionService;

    @Autowired
    public VersionController(IVersionService versionService) {
        this.versionService = versionService;
    }

    // 获取当前最新版本信息
    @RequestMapping("findLastVersionByType")
    public Map<String, Object> findLastVersionByType(int type) {
        return versionService.findLastVersionByType(type);
    }
}
